package com.easychat.entity.enums;

import com.easychat.utils.StringTools;

/**
 * @Author: yudaxian
 * @Description: TODO
 * @DateTime: 2024/8/9 22:24
 **/
public enum UserContactStatusEnum {
    NOT_FRIEND(0, "非好友"),
    FRIEND(1, "好友"),
    DEL(2, "已删除好友"),
    DEL_BE(3, "被好友删除"),
    BLACKLIST(4, "已拉黑好友"),
    BLACKLIST_BE(5, "被好友拉黑"),
    BLACKLIST_BE_FIRST(6, "首次被好友拉黑"),
    ;

    private Integer status;

    private String desc;

    public static UserContactStatusEnum getByStatus(Integer status) {
        try {
            if (null == status) {
                return null;
            }
            return UserContactStatusEnum.valueOf(status.toString());
        } catch (IllegalArgumentException e) {
            return null;
        }
    }

    UserContactStatusEnum(Integer status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    public Integer getStatus() {
        return status;
    }
}
